refac: rename PWL suffix constants for clarity#643
Closed
FBumann wants to merge 1 commit intoPyPSA:feat/piecewise-api-refactorfrom
Closed
refac: rename PWL suffix constants for clarity#643FBumann wants to merge 1 commit intoPyPSA:feat/piecewise-api-refactorfrom
FBumann wants to merge 1 commit intoPyPSA:feat/piecewise-api-refactorfrom
Conversation
- PWL_X_LINK_SUFFIX/_Y_LINK_SUFFIX → PWL_LINK_SUFFIX (N-var, single link)
- PWL_BINARY_SUFFIX → PWL_SEGMENT_BINARY_SUFFIX (disjunctive segment selection)
- PWL_INC_BINARY_SUFFIX → PWL_ORDER_BINARY_SUFFIX (incremental ordering)
- PWL_INC_LINK_SUFFIX → PWL_DELTA_BOUND_SUFFIX (δ ≤ binary)
- PWL_INC_ORDER_SUFFIX → PWL_BINARY_ORDER_SUFFIX (binary_{i+1} ≤ δ_i)
- PWL_FILL_SUFFIX → PWL_FILL_ORDER_SUFFIX (δ_{i+1} ≤ δ_i)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Folding into #642 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rename internal PWL suffix constants to be self-descriptive without relying on method context:
_x_link/_y_link_linkpwl0_link_binary_segment_binarypwl0_segment_binary_inc_binary_order_binarypwl0_order_binary_inc_link_delta_boundpwl0_delta_bound_inc_order_binary_orderpwl0_binary_order_fill_fill_orderpwl0_fill_orderUnchanged:
_lambda,_convex,_delta,_select,_active_boundTest plan
pytest test/test_piecewise_constraints.py— 108 passedmypy . --exclude build— cleanruff check— clean🤖 Generated with Claude Code